<?php


require_once("main.php");
require_once(DIR_LIB."Junona".DIR_SEP."junobjectsfactory.php");

$listModels = JunObjectsFactory::makeModels();

//echo '<pre>';
//die(var_dump($listModels));

$aaModels = array();
foreach($listModels as $m) {
	$aaModels[] = array('label' => iconv('cp1251', 'utf8', $m->number().'. '.$m->name()),
								'value' => $m->id());
	
}
ob_end_clean();
header('Content-Type: application/json');
print json_encode(array('status' => 'ok', 
				'data' => $aaModels));

?>